package com.jieshao.setting

import com.intellij.openapi.components.PersistentStateComponent
import com.intellij.openapi.components.Service
import com.intellij.openapi.components.State
import com.intellij.openapi.components.Storage
import com.intellij.util.xmlb.XmlSerializerUtil
import com.jieshao.utils.PLUGIN_ID
import git4idea.repo.GitRemote


@Service(Service.Level.PROJECT)
@State(name = PLUGIN_ID, storages = [Storage("LineShare.xml")])
class ProjectSettings : PersistentStateComponent<ProjectSettings?> {

    var remote = GitRemote.ORIGIN

    override fun getState() = this

    override fun loadState(state: ProjectSettings) {
        XmlSerializerUtil.copyBean(state, this)
    }

}